/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-11-24 22:18:21  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.risk.entity;

import static javax.persistence.GenerationType.IDENTITY;
import java.util.Set;
import java.util.LinkedHashSet;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.EntityListeners;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "WWYT_RISK_EVALUATION_METHOD_RESULT_ITEM")
@SQLDelete(sql="update WWYT_RISK_EVALUATION_METHOD_RESULT_ITEM set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql="update WWYT_RISK_EVALUATION_METHOD_RESULT_ITEM set DELETE_FLAG = '1' where id= ?")
@Where(clause="DELETE_FLAG = '0'")

public class RiskEvaluationMethodResultItem implements java.io.Serializable{
    
    //columns START
    //ID
    private java.lang.Long id;
    //评估方法
    private java.lang.String method;
    //KEY
    private java.lang.String levelKey;
    //最小值
    private java.lang.Float minValue;
    //最大值
    private java.lang.Float maxValue;
    //安全风险等级CODE
    private java.lang.String riskLevalCode;
    //安全风险等级NUBMER
    private java.lang.Integer riskLevelNumber;
    //安全风险等级名称
    private java.lang.String riskLevelName;
    //本标准中风险等级
    private java.lang.String riskLevelInStandard;
    //应采取的管控级别
    private java.lang.String controlLevel;
    //实施管控措施
    private java.lang.String controlMethod;
    //创建人
    private java.lang.Long createBy;
    //创建时间
    private java.util.Date createTime;
    //更新人
    private java.lang.Long updateBy;
    //更新时间
    private java.util.Date updateTime;
    //删除标记
    private java.lang.String deleteFlag;
    //组织机构代码
    private java.lang.String orgCode;
    //租户
    private java.lang.Long tenentId;
    //columns END


    public void setId(java.lang.Long value) {
        this.id = value;
    }
    
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public java.lang.Long getId() {
        return this.id;
    }
    
     
    @Column(name = "METHOD", length = 10)
    public java.lang.String getMethod() {
        return this.method;
    }
    
    public void setMethod(java.lang.String value) {
        this.method = value;
    }
    
     
    @Column(name = "LEVEL_KEY", length = 10)
    public java.lang.String getLevelKey() {
        return this.levelKey;
    }
    
    public void setLevelKey(java.lang.String value) {
        this.levelKey = value;
    }
    
     
    @Column(name = "MIN_VALUE")
    public java.lang.Float getMinValue() {
        return this.minValue;
    }
    
    public void setMinValue(java.lang.Float value) {
        this.minValue = value;
    }
    
     
    @Column(name = "MAX_VALUE")
    public java.lang.Float getMaxValue() {
        return this.maxValue;
    }
    
    public void setMaxValue(java.lang.Float value) {
        this.maxValue = value;
    }
    
     
    @Column(name = "RISK_LEVAL_CODE", length = 5)
    public java.lang.String getRiskLevalCode() {
        return this.riskLevalCode;
    }
    
    public void setRiskLevalCode(java.lang.String value) {
        this.riskLevalCode = value;
    }
    
     
    @Column(name = "RISK_LEVEL_NUMBER")
    public java.lang.Integer getRiskLevelNumber() {
        return this.riskLevelNumber;
    }
    
    public void setRiskLevelNumber(java.lang.Integer value) {
        this.riskLevelNumber = value;
    }
    
     
    @Column(name = "RISK_LEVEL_NAME", length = 10)
    public java.lang.String getRiskLevelName() {
        return this.riskLevelName;
    }
    
    public void setRiskLevelName(java.lang.String value) {
        this.riskLevelName = value;
    }
    
     
    @Column(name = "RISK_LEVEL_IN_STANDARD", length = 10)
    public java.lang.String getRiskLevelInStandard() {
        return this.riskLevelInStandard;
    }
    
    public void setRiskLevelInStandard(java.lang.String value) {
        this.riskLevelInStandard = value;
    }
    
     
    @Column(name = "CONTROL_LEVEL", length = 500)
    public java.lang.String getControlLevel() {
        return this.controlLevel;
    }
    
    public void setControlLevel(java.lang.String value) {
        this.controlLevel = value;
    }
    
     
    @Column(name = "CONTROL_METHOD", length = 500)
    public java.lang.String getControlMethod() {
        return this.controlMethod;
    }
    
    public void setControlMethod(java.lang.String value) {
        this.controlMethod = value;
    }
    
     
    @org.springframework.data.annotation.CreatedBy
    @Column(name = "CREATE_BY")
    public java.lang.Long getCreateBy() {
        return this.createBy;
    }
    
    public void setCreateBy(java.lang.Long value) {
        this.createBy = value;
    }
    
     
    @org.springframework.data.annotation.CreatedDate
    @Column(name = "CREATE_TIME")
    public java.util.Date getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(java.util.Date value) {
        this.createTime = value;
    }
    
     
    @org.springframework.data.annotation.LastModifiedBy
    @Column(name = "UPDATE_BY")
    public java.lang.Long getUpdateBy() {
        return this.updateBy;
    }
    
    public void setUpdateBy(java.lang.Long value) {
        this.updateBy = value;
    }
    
     
    @org.springframework.data.annotation.LastModifiedDate
    @Column(name = "UPDATE_TIME")
    public java.util.Date getUpdateTime() {
        return this.updateTime;
    }
    
    public void setUpdateTime(java.util.Date value) {
        this.updateTime = value;
    }
    
     
    @Column(name = "DELETE_FLAG", length = 2)
    public java.lang.String getDeleteFlag() {
        return this.deleteFlag;
    }
    
    public void setDeleteFlag(java.lang.String value) {
        this.deleteFlag = value;
    }
    
     
    @Column(name = "ORG_CODE", length = 100)
    public java.lang.String getOrgCode() {
        return this.orgCode;
    }
    
    public void setOrgCode(java.lang.String value) {
        this.orgCode = value;
    }
    
     
    @Column(name = "TENENT_ID")
    public java.lang.Long getTenentId() {
        return this.tenentId;
    }
    
    public void setTenentId(java.lang.Long value) {
        this.tenentId = value;
    }
    

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id",getId())
            .append("method",getMethod())
            .append("levelKey",getLevelKey())
            .append("minValue",getMinValue())
            .append("maxValue",getMaxValue())
            .append("riskLevalCode",getRiskLevalCode())
            .append("riskLevelNumber",getRiskLevelNumber())
            .append("riskLevelName",getRiskLevelName())
            .append("riskLevelInStandard",getRiskLevelInStandard())
            .append("controlLevel",getControlLevel())
            .append("controlMethod",getControlMethod())
            .append("createBy",getCreateBy())
            .append("createTime",getCreateTime())
            .append("updateBy",getUpdateBy())
            .append("updateTime",getUpdateTime())
            .append("deleteFlag",getDeleteFlag())
            .append("orgCode",getOrgCode())
            .append("tenentId",getTenentId())
            .toString();
    }
    
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }
    
    public boolean equals(Object obj) {
        if(obj instanceof RiskEvaluationMethodResultItem == false) return false;
        if(this == obj) return true;
        RiskEvaluationMethodResultItem other = (RiskEvaluationMethodResultItem)obj;
        return new EqualsBuilder()
            .append(getId(),other.getId())
            .isEquals();
    }
}

